home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / utility / cron16.zip / CRONTAB < prev    next >
Text File  |  1991-01-19  |  4KB  |  81 lines

  1. # -------------------------------------------------------------
  2. # Sample CRONTAB to illustrate the use of CRON. Syntax of
  3. # CRONTAB lines is:
  4. #
  5. #   min hour day month day-of-week [!]command[;[!]command...]
  6. #
  7. # Lines starting with '#' and blank lines are ignored.
  8. #
  9. # In the first 5 fields, an asterisk ('*') means 'all' and over-
  10. # rides any other characters in the field.
  11. # Otherwise, both single values, lists and ranges may be given.
  12. # Limits:
  13. #    min    -- 0..59
  14. #    hour    -- 0..23
  15. #    day    -- 1..31 (subject to month variations)
  16. #    month    -- 1..12
  17. #    dow    -- 0..6, 0 = Sunday.
  18. # Fields can be separated by any number of tabs and spaces. Space
  19. # is not allowed within a field, except in the command field.
  20. # Maximum line length is 510 characters.
  21. #
  22. # For best results, set the TZ environment variable to something like
  23. #    TZ=CET-1CDT
  24. # meaning for example "Central European Time, -1 hour after (i.e. 1
  25. # hour before) GMT, daylight savings zone. This will ensure correct
  26. # operation even on the nights -- twice a year -- where the daylight
  27. # savings periods change. If TZ is not set, CRON believes in US
  28. # West Coast time, where Borland lives.
  29. #
  30. # The command section can consist of 1 or more commands, separated
  31. # by ';'. If you need a literal ';' in a command, escape it by entering
  32. # it as '\;' (i.e. prefixed with a backslash).
  33. # Commands prefixed with '!' are executed by the SHELL, i.e.
  34. # by spawning an extra copy of COMMAND.COM. This allows the normal
  35. # DOS redirection facilities, i.e. <, >, >> and | to be used in
  36. # commands, but the return value of the command is lost. CRONLOG
  37. # will show a return code 0 if CRON was able to spawn COMMAND.COM,
  38. # even if COMMAND.COM was unable to spawn the command in its turn.
  39. # This happens because, as we all know, COMMAND.COM isn't the
  40. # brightest boy in the class.
  41. # I suspect that 4DOS or some other intelligent shell program can
  42. # handle this in a better way, although I have not tested this.
  43. #
  44. # If you need '!' or '~' in commands, prefix them with a backslash
  45. # i.e. '\!' and '\~'.
  46. #
  47. # Because the backslash is the universal escape character, it is
  48. # necessary to enter two backslashes in path names, etc.
  49. #
  50. # All right, let's try a few entries.
  51. # --------------------------------------------------------------------
  52. # Print calendar as early as possible on each new year's eve.
  53. 1 0 1 1 * !calendar >LPT1
  54.  
  55. # --------------------------------------------------------------------
  56. # Call my daily BBS'es every night, monday to friday
  57. 45 3 * * 1-5 yam call daily
  58.  
  59. # --------------------------------------------------------------------
  60. # Call BIX once a week doint the standard things (each monday morning)
  61. 47 2 * * 1 yam call bix,grab,newf,logout,quit
  62.  
  63. # --------------------------------------------------------------------
  64. # Back up D: drive to the network server twice a month.
  65. # Note the double backslashes!
  66. 38 2 1,15 * * !d:;!cd \\;pkzip -a -ex -r -p n:\\tron\\save\\ddrive
  67.  
  68. # --------------------------------------------------------------------
  69. # Back up project subdirectory every night (tuesday to saturday)
  70. 27 1 * * 2-6 !d:;!cd \\project;pkzip -a -ex -r -p n:\\tron\\save\\project
  71.  
  72. # --------------------------------------------------------------------
  73. # Print an accounting report every monday and the 1. of every month.
  74. 54 5 1 * 1 prtacct
  75.  
  76. # --------------------------------------------------------------------
  77. # Process telecommunications logs quarterly, send to network laser
  78. 37 4 1 1,4,7,10 * !f:;!cd \\yam\\logfiles;!yamlogs -a >rpt;nprint Q=LASER rpt
  79.  
  80. # End of sample crontab
  81.